
:root {
  --code-layout-color-background: #1e1e1e;
  --code-layout-color-background-second: #252526;
  --code-layout-color-background-light: #333333;
  --code-layout-color-background-highlight: #04395e;
  --code-layout-color-background-hover: #363737;
  --code-layout-color-background-hover-light: #464646;
  --code-layout-color-background-mask-light: rgba(255,255,255,0.2);
  --code-layout-color-highlight: #0078d4;
  --code-layout-color-text: #ccc;
  --code-layout-color-text-light: #fff;
  --code-layout-color-text-highlight: #2f94f1;
  --code-layout-color-text-gray: #818181;
  --code-layout-color-text-disabled: #727272;
  --code-layout-color-border: #474747;
  --code-layout-color-border-light: #cccccc;
  --code-layout-color-border-background: #2a2a2a;
  --code-layout-color-border-white: #fff;
  --code-layout-color-shadow: rgba(0,0,0,0.15);
  --code-layout-color-scrollbar-thumb: rgba(204, 204, 204, 0.4);
  --code-layout-color-scrollbar-thumb-light: rgba(204, 204, 204, 0.6);
  --code-layout-border-size: 1px;
  --code-layout-border-size-larger: 2px;
  --code-layout-border-size-dragger: 4px;
  --code-layout-sash-size: 8px;
  --code-layout-border-radius-small: 5px;
  --code-layout-border-radius-large: 5px;
  --code-layout-header-height: 22px;
  --code-layout-titlebar-background: #3c3c3c;
  --code-layout-titlebar-height: 35px;
  --code-layout-status-height: 20px;
  --code-layout-font-size: 13px;
  --code-layout-font-size-small: 11px;
}

.code-layout-root {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: stretch;
  color: var(--code-layout-color-text);
  background-color: var(--code-layout-color-background);
  font-size: var(--code-layout-font-size);
  overflow: hidden;

  > .code-layout-title-bar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    height: var(--code-layout-titlebar-height);
    background-color: var(--code-layout-titlebar-background);

    > div {
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
    }
  }

  .code-layout-inner-0 {
    position: relative;
    width: 100%;

    > .code-layout-split-base {
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
    }
  }
  > .code-layout-activity {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex: 1;
    height: calc(100% - var(--code-layout-titlebar-height) - var(--code-layout-status-height));

    $activity-bar-width: 45px;

    .code-layout-activity-bar {
      position: relative;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-items: center;
      background-color: var(--code-layout-color-background-light);
      width: $activity-bar-width;

      .OverflowItem {
        width: $activity-bar-width;
        height: $activity-bar-width;
      }

      > .top {
        flex-grow: 1;
        flex-shrink: 1;
        max-height: 90%;
      }
      > .bottom {
        flex-grow: 0;
        flex-shrink: 0;
      }

      .mx-menu-bar.mini {
        justify-content: center;
      }

      .activity-bar-items {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        flex: 1 1 100%;
      }

      .item {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: $activity-bar-width;
        height: $activity-bar-width;
        color: var(--code-layout-color-text-gray);
        cursor: pointer;

        span {
          display: block;
          pointer-events: none;
          max-width: 100%;
          overflow: hidden;
          text-overflow: ellipsis;
        }
        svg {
          pointer-events: none;
          fill: var(--code-layout-color-text-gray);
        }

        .icon {
          position: relative;
          max-width: 100%;
        }
        .badge {
          position: absolute;
          right: 5px;
          bottom: 2px;
          display: inline-block;
          padding: 3px;
          border-radius: var(--code-layout-font-size-small);
          font-size: var(--code-layout-font-size-small);
          min-width: var(--code-layout-font-size-small);
          line-height: var(--code-layout-font-size-small);
          text-align: center;
          background-color: var(--code-layout-color-highlight);
          color: var(--code-layout-color-text-light);
          transform: scale(0.9);
        }  

        &.active, &:hover {
          color: var(--code-layout-color-text-light);

          svg {
            fill: var(--code-layout-color-text-light);
          }
        }

        &.active {

          &::after {
            content: '';
            position: absolute;
            display: block;
            width: 2px;
            top: 0;
            bottom: 0;
            left: 0;
            background-color: var(--code-layout-color-text-light);
          }
        }

        &.drag-enter * {
          pointer-events: none;
        }
        &.drag-over-left, 
        &.drag-over-right,
        &.drag-over-up, 
        &.drag-over-down {
          &::before {
            position: absolute;
            content: '';
            left: 0;
            right: 0;
            height: var(--code-layout-border-size-larger);
            background-color: var(--code-layout-color-border-light);
          }
        }
        &.drag-over-left, &.drag-over-up {
          &::before {
            top: calc(var(--code-layout-border-size-larger) / 2 * -1);
          }
        }
        &.drag-over-right, &.drag-over-down {
          &::before {
            bottom: calc(var(--code-layout-border-size-larger) / 2 * -1);
          }
        }
      }

      &.right .item.active {
        &::after {
          left: unset;
          right: 0;
        }
      }
    }
  }
  > .code-layout-status {
    flex-grow: 0;
    height: var(--code-layout-status-height);
    background-color: var(--code-layout-color-highlight);
  }
}